# -*- coding: utf-8 -*-
##############################################################################
# @Project: ${project_name}
# @QQ: 373500710
# @邮箱: 373500710@qq.com
# @手机: 18505121385
# @作者: elvis
# @Date: ${date}
# @日期: 2016 StyleOdoo Inc. All rights reserved.
##############################################################################


from openerp import models, fields


class StyleFormat(models.Model):
    _name = "style.format"

    # _columns
    code = fields.Char(string="编号", size=50)
    name = fields.Char(string="版型", size=50)
    remarks = fields.Char(string="备注", size=500)


class Year(models.Model):
    _name = "year"

    # _columns
    code = fields.Char(string="编号", size=50)
    name = fields.Char(string="年份", size=50)
    remarks = fields.Char(string="备注", size=500)


class WaistBand(models.Model):
    _name = "waist.band"

    # _columns
    code = fields.Char(string="编号", size=50)
    name = fields.Char(string="腰带类别", size=50)
    remarks = fields.Char(string="备注", size=500)


class Style(models.Model):
    _inherit = "product.template"

    # _columns
    code = fields.Char(string="款号", size=50)
    name_english = fields.Char(string="英文名称", size=200)
    refer_style_no = fields.Char(string="参考款号", size=50)
    style_format = fields.Many2one('style.format', '版型',
                                   select=True
                                   )
    year = fields.Many2one('year', '年份',
                           select=True
                           )
    CO = fields.Boolean(string="客来")
    RV = fields.Boolean(string="RV")
    fair_year = fields.Many2one('year', '展会年份',
                                select=True
                                )
    show_no = fields.Char(string="展号", size=50)
    first_size = fields.Char(string="头版尺码", size=50)
    waist_band = fields.Many2one('waist.band', '腰带类别',
                                 select=True
                                 )
    correcting_remarks = fields.Char(string="改版说明", size=500)
    use_material = fields.Char(string="用料说明", size=500)
